package com.tracker
import grails.converters.JSON

class HotelController {
	HotelService hotelService
	
	def getlist={
		println("HotelController Test")
			render hotelService.getlist(params) as JSON
	}
	
	def getelement = {
		println("HotelController Test")
		try {
			render hotelService.getelement(params) as JSON
		} catch(Exception ex) {
			ex.printStackTrace();
		}
	}
	
	def deleteElement={
		println(params)
			render hotelService.deleteElement(params) as JSON		
	}
	def editElement={
		println(params)
			render hotelService.editElement(params) as JSON
	}
	
	def addElement={
		println(params)
			render hotelService.addElement(params) as JSON
	}
	
  //  def index() { }

}